package com.condroid;

import ioio.lib.api.Uart;

import java.io.OutputStream;
import java.util.Date;
import java.util.LinkedList;

/**
 * SMS session information data
 * @author JUN GAO
 * Condroid Summer CSD 2011 - KTH
 */
public class SmsSession {
	public String phoneNo;
	public Uart uart;
	public UartInfo uartInfo;
	public InUartThread inUartThread;
	public OutputStream outStream;
	public long lastTime = new Date().getTime();
	public State state;
	public LinkedList<String> cmdList = new LinkedList<String>();
	
	/**
	 * used to set the last time this session used.
	 * the session will be used only when there are commands in it
	 */
	public void setLastTime(){
		lastTime = new Date().getTime();
	}
	
	public enum State {
		UNCONNECT, CONNECTED, CLOSING
	}
}
